  <div class="successfull" style="display:<?php echo ($this->session->flashdata('userMesg') ? 'block' : 'none') ?> ">
                <?php echo $this->session->flashdata('userMesg'); ?>  
            </div>
            	
	 <div class="headingBox"  style="padding-top:10px;">
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_leftRound.jpg" width="5" height="24" alt="" /></div>
              <div class="red_midRound" style="width:992px;"><span class="red_midRound" style="width:992px;"><?php echo $page_heading; ?></span></div>
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_rightRound.jpg" width="5" height="24" alt="" /></div>
            </div>
            

            <div>
            
               
            <div class="whiteBox">
       			 <div class="tbl_bgcolor">
            
             <?php 
				$name = (isset($name) && $name != '' ) ? trim($name) : '';
			?>
             <form method="post" id="agent_assign_form" action="<?php echo base_url().$this->uri->segment(1); ?>/assign_agent<?php echo "/$name" ; ?>">
               <input name="sbmt" id="sbmt" value="1" type="hidden">
             
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td colspan="4" align="center">
                    
                    <div style="border:0px solid; width:70%" align="center">
                    
                    	 <div class="selectable" style="float:left; border:0px solid; width:auto; padding:2px">
                          <span style="display:block; text-align:left; padding:2px 0px; font-size:14; font-weight:bold"> Select Agents </span>
                         <select multiple="multiple" id="all_agents"  style="height:350px; width:300px">
                             <?php 
								foreach($agents as $row) 
								{
									if( in_array($row->agent, $skill_member_arr) )
									{
										continue;	
									}
									?>
									<option value='<?php echo $row->agent; ?>'><?php echo $row->agent; /*if( $row->agent_name != '' && $row->agent_name != $row->agent) echo "(".$row->agent_name.")";*/ ?></option>	
							<?php
								}
								?>
                         </select>
                         </div>
                         <div class="selectable" style="float:left; border:0px solid; width:auto; margin-top:150px">
                            <input id="add" type="button" value=">" style="width:27px;"> <br />
                            <input id="add_all" type="button" value=">>"  style="width:27px;"> <br />
                            <input id="remove" type="button"  style="width:27px;" value="<"> <br />
                            <input id="remove_all" type="button"  style="width:27px;" value="<<">
                         </div>
                         
                         <div class="selected"  style="float:left; border:0px solid; width:auto; padding:2px">
                         <span style="display:block; text-align:left; padding:2px 0px; font-size:14; font-weight:bold"> Selected Agents </span>
                         <select multiple="multiple" id="agents" name="agents[]" style="height:350px; width:300px">
                             <?php 
								foreach($agents as $row) 
								{
									if( ! in_array($row->agent, $skill_member_arr) )
									{
										continue;	
									}
									?>
									<option value='<?php echo $row->agent; ?>'><?php echo $row->agent; /*if( $row->agent_name != '' && $row->agent_name != $row->agent) echo "(".$row->agent_name.")";*/ ?></option>	
							<?php
								}
								?>
                         </select>
                         </div>
                         <div style="clear:both"></div>
                         
                         </div>
                         
                              </td>
                      </tr>
                    
                       
                       
                      <tr>
            	          	<td colspan="4" align="left">
        	            	    <input value="" class="backBtn" onclick="location.href='<?php echo base_url().$this->uri->segment(1); ?>';" type="button">
                                 <input value="" class="submitBtn" id="btn_submit" type="button">
 	            	        </td>
                      </tr>
                        
                        
                      </table></td>
                  </tr>
                  
              </table>
              </form>
              
              </div></div>
              
				</div>
  </div>           
  
 <script>
 
 

 
 
     $().ready(function() {  
	 
	 $('#all_agents').dblclick(function() 
	 {  
	 	  $('#all_agents option:selected').remove().appendTo('#agents');  deSelect();
     });
	 
	 $('#agents').dblclick(function() 
	 {  
	 	  $('#agents option:selected').remove().appendTo('#all_agents');  deSelect();
     });
	 
	 
	 $('#add_all').click(function() 
	 {  
	 
		 $('#all_agents option').each(function(i) {  
     		 $(this).remove().appendTo('#agents')
     	});  

	  deSelect();
	  return false;
     });  
	 
	 
	 $('#remove_all').click(function() 
	 {  
		 $('#agents option').each(function(i) {  
     	 $(this).remove().appendTo('#all_agents')
     	});  
	  deSelect();
	  return false;
     });  
	 
	 
     $('#add').click(function() 
	 {  
 	  $('#all_agents option:selected').remove().appendTo('#agents');  
	  deSelect();
	  return false;
      });  
	  
	  
     $('#remove').click(function() {  
	  $('#agents option:selected').remove().appendTo('#all_agents');  
	 deSelect();
	  return false;
	  
     });  
    });  
	
  $('#btn_submit').click(function() 
  {  
	$('#agents option').each(function(i) {  
	 $(this).attr("selected", "selected");  
	});  
	 
	$('#agent_assign_form').submit();
	
    });  
	
	function deSelect()
	{
		$('#agents option').each(function(i) {  
     	 $(this).removeAttr("selected")
     	});
		
		$('#all_agents option').each(function(i) {  
     	 $(this).removeAttr("selected")
     	});	
	}
 
	/*$('#agents').multiSelect({
			selectableHeader : '<h4>Available Agents</h4>',
			selectionHeader : '<h4>Assigned Agents</h4>'
		});
		*/
</script>
  